package net.youball.entity;

/**
 * BallUser entity. @author MyEclipse Persistence Tools
 */

public class BallUser  extends BaseEntity implements
		java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 
	 */
	
	// Fields
	
	private Integer userId;
	private String userName;
	private String nickName;
	private String passWord;
	private String userEmail;
	private String userFace;
	private String userPhone;
	private Integer state;
	private long regTime;
	private Integer configId;
	private BallConfig ballConfig;

	// Constructors

	/** default constructor */
	public BallUser() {
	}

	/** full constructor */
	public BallUser(String userName, String nickName, String passWord,
			String userEmail, String userFace, String userPhone, Integer state,
			long regTime) {
		this.userName = userName;
		this.nickName = nickName;
		this.passWord = passWord;
		this.userEmail = userEmail;
		this.userFace = userFace;
		this.userPhone = userPhone;
		this.state = state;
		this.regTime = regTime;
	}

	// Property accessors

	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getNickName() {
		return this.nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getPassWord() {
		return this.passWord;
	}

	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}

	public String getUserEmail() {
		return this.userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public String getUserFace() {
		return this.userFace;
	}

	public void setUserFace(String userFace) {
		this.userFace = userFace;
	}

	public String getUserPhone() {
		return this.userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public long getRegTime() {
		return this.regTime;
	}

	public void setRegTime(long regTime) {
		this.regTime = regTime;
	}

	public Integer getConfigId() {
		return configId;
	}

	public void setConfigId(Integer configId) {
		this.configId = configId;
	}

	
	public BallConfig getBallConfig() {
		return ballConfig;
	}

	public void setBallConfig(BallConfig ballConfig) {
		this.ballConfig = ballConfig;
	}

	@Override
	public String toString() {
		return "BallUser [configId=" + configId + ", nickName=" + nickName
				+ ", passWord=" + passWord + ", regTime=" + regTime
				+ ", state=" + state + ", userEmail=" + userEmail
				+ ", userFace=" + userFace + ", userId=" + userId
				+ ", userName=" + userName + ", userPhone=" + userPhone + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((ballConfig == null) ? 0 : ballConfig.hashCode());
		result = prime * result
				+ ((configId == null) ? 0 : configId.hashCode());
		result = prime * result
				+ ((nickName == null) ? 0 : nickName.hashCode());
		result = prime * result
				+ ((passWord == null) ? 0 : passWord.hashCode());
		result = prime * result + (int) (regTime ^ (regTime >>> 32));
		result = prime * result + ((state == null) ? 0 : state.hashCode());
		result = prime * result
				+ ((userEmail == null) ? 0 : userEmail.hashCode());
		result = prime * result
				+ ((userFace == null) ? 0 : userFace.hashCode());
		result = prime * result + ((userId == null) ? 0 : userId.hashCode());
		result = prime * result
				+ ((userName == null) ? 0 : userName.hashCode());
		result = prime * result
				+ ((userPhone == null) ? 0 : userPhone.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BallUser other = (BallUser) obj;
		if (ballConfig == null) {
			if (other.ballConfig != null)
				return false;
		} else if (!ballConfig.equals(other.ballConfig))
			return false;
		if (configId == null) {
			if (other.configId != null)
				return false;
		} else if (!configId.equals(other.configId))
			return false;
		if (nickName == null) {
			if (other.nickName != null)
				return false;
		} else if (!nickName.equals(other.nickName))
			return false;
		if (passWord == null) {
			if (other.passWord != null)
				return false;
		} else if (!passWord.equals(other.passWord))
			return false;
		if (regTime != other.regTime)
			return false;
		if (state == null) {
			if (other.state != null)
				return false;
		} else if (!state.equals(other.state))
			return false;
		if (userEmail == null) {
			if (other.userEmail != null)
				return false;
		} else if (!userEmail.equals(other.userEmail))
			return false;
		if (userFace == null) {
			if (other.userFace != null)
				return false;
		} else if (!userFace.equals(other.userFace))
			return false;
		if (userId == null) {
			if (other.userId != null)
				return false;
		} else if (!userId.equals(other.userId))
			return false;
		if (userName == null) {
			if (other.userName != null)
				return false;
		} else if (!userName.equals(other.userName))
			return false;
		if (userPhone == null) {
			if (other.userPhone != null)
				return false;
		} else if (!userPhone.equals(other.userPhone))
			return false;
		return true;
	}

	
}